<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style>
.btn{
	 background-color:#FFF;
	 border:1px solid #CDCDCD;
	 height:24px; width:70px;
	 margin-top: 6px;
} 
.txt{
	 height:22px; border:1px solid #cdcdcd; width:180px;
}
.file{
  position:absolute;
  top:0;left:40px;
  height:24px;
  filter:alpha(opacity:0);opacity: 0;width:260px;
 }

</style>
<script type="text/javascript">

function setTimeTo1(value){
	$("#filter_and_yearAndMonth1_LE_T").val(value) ;
}
function getLastDay(year,month) {  
 var new_year = year;    //取当前的年份
 var new_month = month++;//取下一个月的第一天，方便计算（最后一天不固定）
 if(month>12)            //如果当前大于12月，则年份转到下一年  
{  
  new_month -=12;        //月份减  
  new_year++;            //年份增  
 }  
 var new_date = new Date(new_year,new_month,1);                //取当年当月中的第一天  
 return (new Date(new_date.getTime()-1000*60*60*24)).getDate();//获取当月最后一天日期  
}  

</script>
<div class="pageContent">
	                                
     <div id="resultBox"></div>
	<form enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return iframeCallback(this, navTabAjaxDone);" action="${path }/asset/assetAction!saveAsset.action" method="post" novalidate="novalidate">
		<input type="hidden" name="navTabId" value="${navTabId}"/>
		<div class="pageFormContent" layoutH="85">
		<div class="tip"><span>资产信息：</span></div>
			<p>
				<label>名称：</label>
				 <input type="text" name="assetInfo.name" class="required"   maxlength="50" size="30" />
			</p>
			<p>
				<label>型号：</label>
				 <input type="text" name="assetInfo.models" class="required"   maxlength="50" size="30" />
			</p>
			<p>
				<label>设备编号：</label>
				 <input type="text" name="assetInfo.equipnumber" class="required"   maxlength="50" size="30" />
			</p>
			<p>
				<label>资产分类：</label>
				<select class="required" name="assetInfo.type" rel="iselect" loadUrl="${path}/hpin/sysDictType!treeRegion.action?defaultID=10105">
				</select>
			</p>
			<%-- <p>
				<label>资产状态：</label>
				<select class="required" name="asset.state" rel="iselect" loadUrl="${path}/hpin/sysDictType!treeRegion.action?defaultID=10117">
				</select>
			</p> --%>
			<!-- <p>
				<label>权属关系：</label>
				 <input type="text" name="asset.belongto" class="required"   maxlength="50" size="30" />
			</p> -->
			
				
			 <p>
				<label>生产日期：</label>
				<input type="text" name="assetInfo.producedate"  class="date required" size="20" datefmt="yyyy-MM-dd" value="${fn:substring(assetInfo.producedate,0,10) }"/>
				<a class="inputDateButton" href="javascript:;">选择</a>
			</p> 
			<p>
				<label>生产厂商：</label>
				 <input type="text" name="assetInfo.produceunit"  maxlength="50" size="30" />
			</p>
			<p>
				<label>资产金额：</label>
				 <input type="text" name="assetInfo.money" class="required"   maxlength="50" size="30" />
			</p>
			 <p>
				<label>计量单位：</label>
				<select class="required" name="assetInfo.measure" rel="iselect" loadUrl="${path}/hpin/sysDictType!treeRegion.action?defaultID=10104">
					
				</select>
			</p> 
			<p>
				<label>供货单位：</label>
				<input type="hidden" size="32"  name="assetInfo.supplyunit" bringBackName = "suppliers.id" value="${ suppliers.id }" />
				 <input type="text" class="required" bringBackName = "suppliers.name" maxlength="32" size="30" value="${suppliers.name }"/><a style="z-index: 9999" class="btnLook" href="${path }/asset/suppliersAction!lookUpSuppliers.action" lookupGroup="suppliers">查找带回</a>
			</p>
			<p>
				<label>购买时间：</label>
				 <input type="text" name="assetInfo.buyTime" class="date" size="20" datefmt="yyyy-MM-dd" value="${fn:substring(assetInfo.buyTime,0,10) }"/>
				<a class="inputDateButton" href="javascript:;">选择</a>
			</p>
			<p>
				<label>规定使用年限  (年)：</label>
				 <input type="text" name="assetInfo.lifeyears" class="required"   maxlength="50" size="30" />
			</p>
			<p>
				<label>已使用年限  (年)：</label>
				 <input type="text" name="assetInfo.usedyears" class="required"   maxlength="50" size="30" />
			</p>
			<p>
				<label>保修起始日期：</label>
				<input type="text" name="assetInfo.startTime"  class="date required" size="20" datefmt="yyyy-MM-dd" value="${fn:substring(assetInfo.startTime,0,10) }"/>
				<a class="inputDateButton" href="javascript:;">选择</a>
			</p>
			<p>
				<label>保修天数  (天)：</label>
				 <input type="text" name="assetInfo.warrantydays" class="required"   maxlength="50" size="30" />
			</p>
	         <div class="tip"><span>备注：</span></div>	
	        <p>
				<label>备注：</label>
				<textarea cols="35" rows="2" name="assetInfo.remark" style="width:570px;"></textarea>
			</p>
			
   
			</div>
			 <div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" onclick="doit();">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="reset">重置</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
